<?php
$this->breadcrumbs = array(
    'Product Comments' => array('index'),
    'Manage',
);

$this->menu = array(
    array('label' => 'List ProductComment', 'url' => array('index')),
    array('label' => 'Create ProductComment', 'url' => array('create')),
);
?>
<div class="widget">
    <div class="head">
        <h5 class="iFrames">Comment List</h5>
    </div>
    <div class="body">
        <?php
        $this->widget('zii.widgets.grid.CGridView', array(
            'id' => 'product-comment-grid',
            'dataProvider' => $model->search(),
            'filter' => $model,
            'cssFile' => Yii::app()->baseUrl . Constant::CGRIDVIEW_CSS_URL,
            'template' => Constant::GRIDVIEW_TEMPLATE,
            'pager' => array(
                'header' => Constant::PAGER_HEADER,
                'cssFile' => Yii::app()->baseUrl . Constant::PAGER_CSS_URL,
                'prevPageLabel' => Constant::PAGER_PREV_PAGE_LABEL,
                'nextPageLabel' => Constant::PAGER_NEXT_PAGE_LABEL,
            ),
            'columns' => array(
                'commentId',
                'content',
                'userId',
//		'createdUserId',
//		'createdDate',
//		'updatedUserId',
//		'updatedDate',
                /*
                  'likeCount',
                  'dislikeCount',
                  'parentId',
                  'isApproved',
                  'productId',
                  'isDeleted',
                 */
                array(
                    'header' => 'Commands',
                    'class' => 'CButtonColumn',
                    'template' => $template,
                    'htmlOptions' => array('width'=> Constant::CBUTTONCOLUMN_WIDTH),
                    'buttons' => array(
                        'update' => array(
                            'update' => 'update',
                            'imageUrl' => Yii::app()->request->baseUrl . Constant::CRUD_IMAGE_URL_EDIT,
                        ),
                        'view' => array(
                            'view' => 'view',
                            'imageUrl' => Yii::app()->request->baseUrl . Constant::CRUD_IMAGE_URL_VIEW,
                        ),
                        'trash' => array(
                            'view' => 'trash',
                            'label' => 'Trash',
                            'imageUrl' => Yii::app()->request->baseUrl . Constant::CRUD_IMAGE_URL_TRASH,
                            'url' => 'Yii::app()->createUrl("' . Yii::app()->controller->id  . '/trash", array("id" => $data->primaryKey))',
                        ),
                        'untrash' => array(
                            'view' => 'untrash',
                            'label' => 'Untrash',
                            'imageUrl' => Yii::app()->request->baseUrl . Constant::CRUD_IMAGE_URL_UNTRASH,
                            'url' => 'Yii::app()->createUrl("' . Yii::app()->controller->id  . '/untrash", array("id" => $data->primaryKey))',
                        ),
                        'delete' => array(
                            'delete' => 'delete',
                            'imageUrl' => Yii::app()->request->baseUrl . Constant::CRUD_IMAGE_URL_DELETE,
                        ),
                    ),
                ),
            ),
        ));
        ?>
    </div>
</div>